import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/Home'
  },
  {
    path: '/Home', // 登录
    name: 'Home',
    component: () => import('../views/Home'),
    redirect: '/Overview',
    children: [
      {
        path: '/Overview', // 首页商品列表
        name: 'Overview',
        component: () => import('../views/Overview/Overview.vue')
      },{
        path: '/Login/login', // 登录注册
        name: 'login',
        component: () => import('../views/Login/login.vue')
      },{
        path: '/New/new', // 消息中心
        name: 'new',
        component: () => import('../views/New/new.vue')
      },{
        path: '/Keep/keep', // 收藏夹
        name: 'keep',
        component: () => import('../views/Keep/keep.vue')
      },{
        path: '/State/state', // 声明
        name: 'state',
        component: () => import('../views/State/state.vue')
      },{
        path: '/Help/help', // 帮助
        name: 'help',
        component: () => import('../views/Help/help.vue')
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
